#pragma once
#include <libxml/tree.h>
class ZMDStrConvert
{
public:
	ZMDStrConvert(void);
	~ZMDStrConvert(void);
	static int ConvertToMB(string& pmb, const string& strNeedToConvert, const string strCharSet);
	static int ConvertToUTF8(string& pmb, const string& strNeedToConvert, const string strCharSet);

	static char *utf8ConvertTo(xmlChar *in, const char *encoding);
	static xmlChar *convertToUTF8From(const char *in, const char *encoding);
	static int gbk_output(unsigned char *out, int *outlen,  const unsigned char *in, int *inlen);
	static int gbk_input(unsigned char *out, int *outlen, const unsigned char *in, int *inlen);

private:
	static int UTF8ToMB(string& pmb, const char* pu8, int utf8Len);
};

